package Config

import (
	"os"

	"gopkg.in/yaml.v2"
)

type Config struct {
	Config struct {
		RunPort string `yaml:"run_port"`
		Mysql   struct {
			Host     any
			Port     any
			User     any
			Password any
			Dbname   any
			Debug    bool
		}
		Hongkong struct {
			Host     any
			Port     any
			User     any
			Password any
		}
	}
}

var Conf *Config

func init() {
	f, _ := os.Open("Config/database.yaml")
	yaml.NewDecoder(f).Decode(&Conf)
	f.Close()
}
